package com.zqx.strategy.client;

import com.zqx.strategy.abstractstrategy.Discount;
import com.zqx.strategy.context.MovieTicket;
import com.zqx.strategy.utils.XMLUtil;
import lombok.extern.slf4j.Slf4j;

/**
 * description: 客户端测试类
 * @author zqx
 * @date 2018/09/04
 */
@Slf4j
public class Client {

    public static void main(String[] args) {
        MovieTicket movieTicket = new MovieTicket();
        double originalPrice = 60.0;
        double currentPrice;
        movieTicket.setPrice(originalPrice);
        log.info("原价为,{}",originalPrice);
        log.info("================================");
        Discount discount;
        discount = (Discount)XMLUtil.getBean();
        movieTicket.setDiscount(discount);

        currentPrice = movieTicket.getPrice();
        log.info("折后价为,{}",currentPrice);
        System.out.println("分支测试02冲突冲突");
    }
}
